package com.itheima_01.monitest.first;

import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        int max=getMax();
        System.out.println("您所输入的三个数据中最大的数是"+max);
    }

    private static int getMax() {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入三个数：");

        int[] arr = new int[3];
        for (int i = 0; i < 3; i++) {
            int num = sc.nextInt();
            arr[i] = num;
        }
        int max = arr[0];
        for (int i = 1; i < 3; i++) {
            if (max < arr[i]) {
                max = arr[i];
            }
        }
        return max;
    }
}